package demo5.controller;

import demo5.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

/**
 * Controller 将来用于和用户打交道（与浏览器交互部分）
 *
 * UserController 负责处理来自浏览器（用户）和用户信息相关的请求
 */

@Controller
public class UserController {

    @Autowired
    private IUserService userService;
    public void doLogin(){
        System.out.println("userController收到用户请求，要求登录");
        boolean result = userService.login("admin","123456");
        if(result){
            System.out.println("登录成功");
        }else{
            System.out.println("登录失败");
        }
    }
}
